package com.software.demo11;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class Service {
    @Autowired
    @Qualifier("b")

    //@Resource(type = CImplements.class)
    AInterface aInterface;

    public void servicePrint() {
        aInterface.print();
    }

    public AInterface getaInterface() {
        return aInterface;
    }

    public void setaInterface(AInterface aInterface) {
        this.aInterface = aInterface;
    }
}
